<!DOCTYPE html>
<html>
<head lang="en">
	<meta charset="UTF-8">
	<title>百朋后台管理系统</title>
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/themes/icon.css">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/demo.css">
	<script type="text/javascript" src="__PUBLIC__/easyui/jquery.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/easyui/jquery.easyui.min.js"></script>
</head>
<body>
<div class="profit_table">
	<table id="profit_table" title="Client Side Pagination" style="width:100%;height:372px;" 
		data-options="
			rownumbers:true,
			singleSelect:true,
			autoRowHeight:false,
			pagination:true,
			pageSize:10,toolbar:'#tb'
		"
	>
		<thead>
			<tr>
				<th field="invest_income_id" width="10%" align="center">序号</th>
				<th field="cust_name" width="10%" align="center">客户姓名</th>
				<th field="invest_id" width="10%" align="center">投资ID</th>
				<th field="invest_title" width="19%" align="center">投资标题</th>
				<th field="start_time" width="10%" align="center">收益开始时间</th>
				<th field="end_time" width="10%" align="center">收益结束时间</th>
				<th field="invest_interest" width="10%" align="center">利息</th>
				<th field="period_money_count" width="10%" align="center">收益金额</th>
				<th field="profit_time" width="10%" align="center">状态</th>
			</tr>
		</thead>
	</table>
</div>
<div id="tb" style="padding:5px;height:auto">
	<form action="../../invest/profit/profit_manage" method="post" id="searchTable">
		<div>
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;投资人: <input class="easyui-textbox" id="name" name="name" value="{$search_array.name}" style="width:120px">&nbsp;&nbsp;&nbsp;&nbsp;
			投资标题: <input class="easyui-textbox" name="title" id="title" value="{$search_array.title}" style="width:200px">&nbsp;&nbsp;&nbsp;&nbsp;
			收益时间: <input class="easyui-datebox" id="time" name="time" data-options="formatter:myformatter,parser:myparser,editable:false" value="{$search_array.time}" style="width:120px">&nbsp;&nbsp;&nbsp;&nbsp;
			状态类型: 
			<select class="easyui-combobox selector" id="type" name="type" panelHeight="auto" style="width:100px" data-options="editable:false">
				<option value="">请选择</option>
				<option value="1">未放款</option>
				<option value="2">已放款</option>
				<option value="3">异常</option>
			</select>&nbsp;&nbsp;&nbsp;&nbsp;
			<script> $(".selector").find("option[value='{$search_array.type}']").attr("selected",true);</script>
			<a href="javascript:;" onclick="submitSearch();" class="easyui-linkbutton" iconCls="icon-search">查询</a>&nbsp;&nbsp;
			<a href="javascript:;" onclick="resetSearch();" class="easyui-linkbutton" iconCls="icon-clear">重置</a>
		</div>
	</form>
	<form action="../../invest/profit/profit_manage" method="post" id="time7Select">
		<input type ="hidden" name= "time7" value = "604800">
	</form>
	<form action="../../invest/profit/profit_manage" method="post" id="time15Select">
		<input type ="hidden" name= "time15" value = "1296000">
	</form>
	<form action="../../invest/profit/profit_manage" method="post" id="time30Select">
		<input type ="hidden" name= "time30" value = "2592000">
	</form>
</div>
<div style="padding:10px 0 10px 30px;text-align:left">
	<span style="font-size:13px;text-align:center;margin:0 10px 0 0;">近期收益快速查询:</span>
	<a href="javascript:;" onclick="time7Submit();" class="easyui-linkbutton" style="width:40px;margin:0 10px 0 0;">7天</a>
	<a href="javascript:;" onclick="time15Submit();" class="easyui-linkbutton" style="width:40px;margin:0 10px 0 0;">15天</a>
	<a href="javascript:;" onclick="time30Submit();" class="easyui-linkbutton" style="width:40px;margin:0 10px 0 0;">30天</a>
</div>

<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
<script type="text/javascript">
	$(function() 
	{
		var json='{$profit_json}';
		var array=eval('('+json+')');
		console.log(array);
		$('#profit_table').datagrid({loadFilter:pagerFilter}).datagrid('loadData', array);
	});

	function submitSearch() 
	{
		$("#searchTable").submit();
	}

	function resetSearch() 
	{
		$("#name").textbox("setValue","");
		$("#title").textbox("setValue","");
		$("#time").textbox("setValue","");
		$("#type").combobox("setValue","");
	}

	function time7Submit() 
	{
		$("#time7Select").submit();
	}

	function time15Submit() 
	{
		$("#time15Select").submit();
	}

	function time30Submit() 
	{
		$("#time30Select").submit();
	}
</script>
</body>
</html>